import Catalog from '@/views/catalog/catalog.vue'
import CourtInfo from '@/views/courtInfo/courtInfo.vue'
import Index from '@/views/index/index.vue'
import Layout from '@/views/layout/Layout.vue'
import Password from '@/views/password/password.vue'
import Person from '@/views/person/person.vue'
import Reserve from '@/views/reserve/reserve.vue'
import Manager from '@/views/user/manager.vue'
import SuperManager from '@/views/user/superManager.vue'
import User from '@/views/user/user.vue'
import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: Layout,
      redirect:'/index',
      children:[
        {
          path:'/index',
          component:Index
        },
        {
          path:'/catalog',
          component:Catalog
        },
        {
          path:'/courtInfo',
          component:CourtInfo
        },
        {
          path:'/reserve',
          component:Reserve
        },
        {
          path:'/person',
          component:Person
        },
        {
          path:'/password',
          component:Password
        },
        {
          path:'/user',
          component:User
        },
        {
          path:'/manager',
          component:Manager
        },
        {
          path:'/superManager',
          component:SuperManager
        }
      ]
    },
    // {
    //   path: '/about',
    //   name: 'about',
    //   component: () => import('../views/AboutView.vue'),
    // },
  ],
})

export default router
